package com.bawei.base.room

import androidx.room.Dao
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Query
import com.bawei.base.bean.LoginCodeResult

@Dao
interface UserDao {

    //新增   查询

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun insert(loginCodeResult: LoginCodeResult)

    //但当有人人为的修改数据时，可能会崩溃
    @Query("select * from userEntity where phone =:phone")
    fun qurey(phone:String):MutableList<LoginCodeResult>
}